package de.stefanocke.roo.wicket.model;

import org.springframework.roo.classpath.details.MethodMetadata;
import org.springframework.roo.model.JavaType;

/**
 * A service that filters the properties of a model class before GUI
 * scaffolding. Typically, technical properties required for persistence (id and
 * version property, for example) are excluded. Other implementations might
 * provide global exclusions based on naming rules (f.e.
 * "exclude all properties with the name 'lastUpdatedTimestamp'") or on property
 * type (f.e. "exclude all properties with type User").
 * 
 * @author stefan
 * 
 */
public interface IPropertyFilter {
	/**
	 * 
	 * @param clientMID the MID of the metadata that asks
	 * @param modelClass the model class
	 * @param accessor the getMethod of the considered property
	 * @return false means, the property shall not be used in the GUI. True
	 *         means, it might bee used in the GUI, if no other filter votes
	 *         against it.
	 */
	public boolean isGUIProperty(String clientMID, JavaType modelClass, MethodMetadata accessor);
}
